﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Ops.Host.Core.Models;

/// <summary>
/// 能耗信息
/// </summary>
[Table("ops_energy_consumption")]
public class EnergyConsumption : Entity
{
    /// <summary>
    /// 工站
    /// </summary>
    [NotNull]
    [Required]
    [Display(Name = "工站")]
    public string? Station { get; set; }

    /// <summary>
    /// 能耗分类。
    /// 1->有功耗；2->无功耗
    /// </summary>
    [Required]
    [Display(Name = "能耗分类")]
    public int Category { get; set; }

    /// <summary>
    /// 描述。
    /// </summary>
    [Display(Name = "描述")]
    public string? Desc { get; set; }

    /// <summary>
    /// 能耗
    /// </summary>
    [Display(Name = "能耗")]
    public decimal Energy { get; set; }

    /// <summary>
    /// 记录时间
    /// </summary>
    [Display(Name = "记录时间")]
    public DateTime CreatedAt { get; set; }
}
